using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Text;
using DailyDiet.Services;
using DailyDiet.Services.Impl;
using DailyDiet.Services.Navigation;
using DailyDiet.util;
using DailyDiet.ViewModels.TestViewModel;
using GalaSoft.MvvmLight.Ioc;

namespace DailyDiet.ViewModels
{
    public class ViewModelLocator
    {
        public AppShellViewModel AppShellViewModel =>
            SimpleIoc.Default.GetInstance<AppShellViewModel>();

        public HealthInfoViewModel HealthInfoViewModel =>
            SimpleIoc.Default.GetInstance<HealthInfoViewModel>();

        public MyPageViewModel MyPageViewModel =>
            SimpleIoc.Default.GetInstance<MyPageViewModel>();

        public TasteSetViewModel TasteSetViewModel =>
            SimpleIoc.Default.GetInstance<TasteSetViewModel>();

        public InitializeViewModel InitializeViewModel =>
            SimpleIoc.Default.GetInstance<InitializeViewModel>();

        public AllDietsPageViewModel AllDietsPageViewModel =>
            SimpleIoc.Default.GetInstance<AllDietsPageViewModel>();

        public DietsDetailPageViewModel DietsDetailPageViewModel =>
            SimpleIoc.Default.GetInstance<DietsDetailPageViewModel>();

        public FavoritePageViewModel FavoritePageViewModel =>
            SimpleIoc.Default.GetInstance<FavoritePageViewModel>();

        public RecViewModel RecViewModel =>
            SimpleIoc.Default.GetInstance<RecViewModel>();

        public RecordViewModel RecordViewModel =>
            SimpleIoc.Default.GetInstance<RecordViewModel>();

        public CalendarViewModel CalendarViewModel =>
            SimpleIoc.Default.GetInstance<CalendarViewModel>();

        public RecDietsDetailPageViewModel RecDietsDetailPageViewModel =>
            SimpleIoc.Default.GetInstance<RecDietsDetailPageViewModel>();

        public SelfDefinePageViewModel SelfDefinePageViewModel =>
            SimpleIoc.Default.GetInstance<SelfDefinePageViewModel>();

        public VersionPageViewModel VersionPageViewModel =>
            SimpleIoc.Default.GetInstance<VersionPageViewModel>();

        public DietFeedbackViewModel DietFeedbackViewModel =>
            SimpleIoc.Default.GetInstance<DietFeedbackViewModel>();

        public ViewModelLocator()
        {

            SimpleIoc.Default.Register<AppShellViewModel>();
            SimpleIoc.Default.Register<HealthInfoViewModel>();
            SimpleIoc.Default.Register<MyPageViewModel>();
            SimpleIoc.Default.Register<AllDietsPageViewModel>();
            SimpleIoc.Default.Register<IContentNavigationService, ContentNavigationService>();
            SimpleIoc.Default.Register<IContentPageActivationService, ContentPageActivationService>();
            SimpleIoc.Default.Register<IHealthInfoService, HealthInfoService>();
            SimpleIoc.Default.Register<IDietStorageService, DietStorageService>();
            SimpleIoc.Default.Register<IPreferenceStorage, PreferenceStorage>();
            SimpleIoc.Default.Register<DietsDetailPageViewModel>();
            SimpleIoc.Default.Register<RecDietsDetailPageViewModel>();

            SimpleIoc.Default.Register<TasteSetViewModel>();
            SimpleIoc.Default.Register<InitializeViewModel>();
            SimpleIoc.Default.Register<RecViewModel>();
            SimpleIoc.Default.Register<IFavoriteStorageService,FavoriteStorageService>();
            SimpleIoc.Default.Register<FavoritePageViewModel>();
            SimpleIoc.Default.Register<IGetRecService,GetRecService>();
            SimpleIoc.Default.Register<IDietRecorderStorageService,DietRecorderStorageService>();
            SimpleIoc.Default.Register<IAlertService,AlertService>();
            SimpleIoc.Default.Register<IDietsSerializeService,DietsSerializeService>();
            SimpleIoc.Default.Register<ICacheSerializeService,CacheSerializeService>();
            SimpleIoc.Default.Register<IRecommendService,RecommendServiceImpl>();
            SimpleIoc.Default.Register<RecordViewModel>();
            SimpleIoc.Default.Register<SelfDefinePageViewModel>();
            SimpleIoc.Default.Register<VersionPageViewModel>();

            SimpleIoc.Default.Register<CalendarViewModel>();
            SimpleIoc.Default.Register<IDietPictureService,DietPictureService>();
            SimpleIoc.Default.Register<IDietToDietAndPictureService,DietToDietAndPictureService>();
            SimpleIoc.Default.Register<ISplitSentenceService,SplitSentenceService>();
            SimpleIoc.Default.Register<IRecorderUtilService, RecorderUtilService>();
            SimpleIoc.Default.Register<IRecorderStorageFillMeassage, RecorderStorageFillMeassage>();
            SimpleIoc.Default.Register<INotificationService,NotificationService>();

            SimpleIoc.Default.Register<DietFeedbackViewModel>();
        }
    }
}